package com.you.spring.boot.starter;


import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = MybatisPlusGenerateProperties.MYBATIS_PLUS_PREFIX)
public class MybatisPlusGenerateProperties {

    public static final String MYBATIS_PLUS_PREFIX = "mybatis.plus.generate";

    @NestedConfigurationProperty
    private DataSourceConfig dataSource;

    @NestedConfigurationProperty
    private StrategyConfig strategy;

    @NestedConfigurationProperty
    private PackageConfig packageInfo;

    @NestedConfigurationProperty
    private GlobalConfig globalConfig;


    public DataSourceConfig getDataSource() {
        return dataSource;
    }

    public void setDataSource(DataSourceConfig dataSource) {
        this.dataSource = dataSource;
    }

    public StrategyConfig getStrategy() {
        return strategy;
    }

    public void setStrategy(StrategyConfig strategy) {
        this.strategy = strategy;
    }

    public PackageConfig getPackageInfo() {
        return packageInfo;
    }

    public void setPackageInfo(PackageConfig packageInfo) {
        this.packageInfo = packageInfo;
    }

    public GlobalConfig getGlobalConfig() {
        return globalConfig;
    }

    public void setGlobalConfig(GlobalConfig globalConfig) {
        this.globalConfig = globalConfig;
    }
}
